<template>
  <div id="app">
    <header class="header"></header>
    <main class="main">
      <CityMap></CityMap>
    </main>
    <footer class="footer"></footer>
  </div>
</template>

<script>
/**
 * 直接在父组件内部控制子组件的元素，插槽
 * 1. 默认插槽
 * 2. 具名插槽
 * 3. 作用域插槽 （子内部的数据。向父组件传递参数）
 */
import axios from 'axios'
import HeaderBar from './components/HeaderBar.vue'
import CityMap from './components/CityMap.vue'
export default {
  name: 'App',
  components: { HeaderBar, CityMap },
  data() {
    return {
      title: 'Hello Vue',
    }
  },
  created() {},
  mounted() {},
  updated() {},
  destroyed() {},
  methods: {},
}
</script>

<style lang="scss">
* {
  margin: 0;
  padding: 0;
  list-style: none;
  box-sizing: border-box;
}
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.header {
  height: 50px;
  border-bottom: 1px solid #000;
}
.main {
  flex: 1;
  overflow: auto;
  display: flex;
  .left {
    flex: 2;
    border-right: 1px solid #ccc;
    span {
      display: block;
      margin: 5px;
      // padding: 5px;
      width: 90%;
      height: 35px;
      line-height: 35px;
      text-align: center;
      border: 1px solid #ccc;
      border-radius: 5px;
      &.active {
        background: red;
        color: gold;
      }
    }
  }
  .right {
    flex: 8;
    display: flex;
    flex-wrap: wrap;
    ul {
      flex: 1;
      padding: 5px;
      margin: 5px;
    }
  }
}
.footer {
  height: 50px;
  border-top: 1px solid #000;
}
</style>
